import { createRouter, createWebHistory } from 'vue-router'

export const constantRouter = [
    {
        path: '/',
        name: 'Index',
        component: () => import('@/views/Index/Index')
    },
    {
        path: '/search',
        name: 'Search',
        component: () => import('@/views/Repository/Search')
    },
    {
        path: '/:catchAll(.*)',
        meta: {
            onCache: false,
            onTag: false
        },
        redirect: "/"
    }
]

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: constantRouter
})

export default router
